<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>SoundPlugin.pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Sound example file
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font>
<b><font color="#006666">If</font></b> <font color="#006666">InitSound</font>() = 0
<font color="#006666">  MessageRequester</font>("Error", "Can't open DirectX 7 or no sound card is available",  0)
  <b><font color="#006666">End</font></b>
<b><font color="#006666">EndIf</font></b>

<font color="#006666">UseOGGSoundDecoder</font>()

SoundFileName$ =<font color="#006666"> OpenFileRequester</font>("Choose a sound file", "", "Wave or OGG files|*.wav;*.ogg",0)
<b><font color="#006666">If</font></b> SoundFileName$
  <b><font color="#006666">If</font></b> <font color="#006666">LoadSound</font>(0, SoundFileName$)
<font color="#006666">    PlaySound</font>(0,<font color="#924B72">#PB_Sound_Loop</font>)
<font color="#006666">    MessageRequester</font>("Sound", "Playing the sound (loop)..."+<font color="#006666">Chr</font>(10)+"Click to quit..", 0)
  <b><font color="#006666">Else</font></b>
<font color="#006666">    MessageRequester</font>("Error", "Can't load the sound.", 0)
  <b><font color="#006666">EndIf</font></b>
<b><font color="#006666">EndIf</font></b>
<b><font color="#006666">End</font></b>   </font></pre>
</body></html>
